<%-- 
    Document   : Register
    Created on : 2012-12-2, 22:37:35
    Author     : Timmy
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="<c:url value='/css/main.css'/>" rel="stylesheet" type="text/css"/>
        <link href="<c:url value='/css/tablecss.css'/>" rel="stylesheet" type="text/css"/>
        <link href="<c:url value="/css/jquery-ui-1.9.2.custom.min.css" />" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<c:url value="/scripts/jquery.js" />" ></script>
        <script type="text/javascript" src="<c:url value="/scripts/jquery-ui-1.9.2.custom.min.js" />" ></script>
        <script type="text/javascript">
            $(document).ready(function(){
               $(".linkBtn").button(); 
                    if ($("#IsUpdate").val()-0)
                   {
                       $("#userName").attr("readonly","readonly");
                   }
            });
            
            function clearForm()
            {
                $("#registerForm")[0].reset();
            }
            
            function submitForm()
            {
                $("#registerForm").submit();
            }
        </script>
    </head>
    <body>
        <s:form id="registerForm" namespace="/usermgmt" action="processUpdate">
            <s:actionerror/>
            <div class="maindiv">
                <div class="globalTb">
                    <table>
                        <tr><td>Registration</td></tr>
                    </table>
                </div>
                <div>
                    <fieldset class="manfieldset">
                        <legend class="mainLegend">Account</legend>

                        <div class="globalTb">
                         

                                    <table>
                                        <tr><td colspan="2" style="display: none;"></tr>
                                        <tr>
                                            <td class="tdLabel"><b>User Name:</b></td>
                                            <td><input type="text" id="userName" value="<s:property value="oneProfile.userName"/>" size ="40" name="userName"  />
                               <s:fielderror><s:param>userName</s:param></s:fielderror>
                                        </tr>
                                <tr>
                                    <td class="tdLabel"><b>Password :</b></td>
                                    <td><input type="password" name="passWord" size="40" maxlength="40"/>
                    <s:fielderror><s:param>password</s:param></s:fielderror>
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Confirm Password:</b></td>
                                    <td><input type="password" name="confirmpassword" size="40" maxlength="40"/>
                    <s:fielderror><s:param>password</s:param></s:fielderror>
                                </tr>
                                
                            </table>
                        </div>
                    </fieldset>

                    <fieldset class="manfieldset">

                        <legend class="mainLegend">Profile</legend>
                        <div class="globalTb">
                            <table>
                                <tr><td colspan="2" style="display: none;"></tr>
                                <tr>
                                    <td class="tdLabel"><b>Blog:</b></td>
                                    <td><input type="text" id="profile.blog" value="<s:property value="oneProfile.blog"/>" size ="40" name="oneProfile.blog" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Website:</b></td>
                                    <td><input type="text" id="profile.website" value="<s:property value="oneProfile.website"/>" size ="40" name="oneProfile.website" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Company Name:</b></td>
                                    <td><input type="text" id="profile.companyName" value="<s:property value="oneProfile.companyName"/>" size ="40" name="oneProfile.companyName" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Company Address:</b></td>
                                    <td><input type="text" id="profile.companyAddress" value="<s:property value="oneProfile.companyAddress"/>" size ="40" name="oneProfile.companyAddress" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Email:</b></td>
                                    <td><input type="text" id="profile.email" value="<s:property value="oneProfile.email"/>" size ="40" name="oneProfile.email" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Home Tel:</b></td>
                                    <td><input type="text" id="profile.homeTel" value="<s:property value="oneProfile.homeTel"/>" size ="40" name="oneProfile.homeTel" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Mobile:</b></td>
                                    <td><input type="text" id="profile.mobile" value="<s:property value="oneProfile.mobile"/>" size ="40" name="oneProfile.mobile" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Address:</b></td>
                                    <td><input type="text" id="profile.address" value="<s:property value="oneProfile.address"/>" size ="40" name="oneProfile.address" />
                                </tr>
                                <tr>
                                    <td class="tdLabel"><b>Postcode:</b></td>
                                    <td><input type="text" id="profile.postcode" value="<s:property value="oneProfile.postCode"/>" size ="40" name="oneProfile.postCode" />
                                </tr>
                            </table>
                        </div>
                    </fieldset>
                </div>
                <div class="globalTb">
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <a href="javascript:submitForm();" class="linkBtn">Submit</a>
                                <a href="javascript:clearForm();" class="linkBtn">Cancel</a>
                            </td>
                        </tr>
                    </table>
                 </div>
            </div>
            <input type="hidden" name="IsUpdate" id="IsUpdate" value="<s:property value="IsUpdate" />" />
        </s:form>
    </body>
</html>
